Tag Link | [String->Find] | Category | String |
---|---|---|---|
Type | Member | Source Available | No |
Support | Preferred | Version | 5.0 |
Change | Unchanged | Data Source | Any |
Output Type | Integer | Security | None |
Implementation | LCAPI | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0 |
[String->Find] returns the position at which the first parameter is found within the string or 0 if the first parameter is not found within the string. Requires a single string parameter. The pattern is not case sensitive.
Optional parameters allow a portion of the string to be searched by specifying the offset at which to start searching and the number of characters from the offset to search.
Optional parameters allow a portion of the pattern to be used as the search pattern by specifying the offset into the pattern and the number of characters from the pattern to search for.
[String Variable->(Find: 'Pattern')]
[String Variable->(Find: 'Pattern', Offset, Length)]
[String Variable->(Find: 'Pattern', Offset, Length, Pattern Offset, Pattern Length)]
Required Parameters | |
---|---|
Pattern | The pattern which should be searched for in the string. |
Optional Parameters | |
Offset | The offset into the search string at which to start looking for the pattern. Defaults to the start of the search string. |
Length | The length from the offset for which to search the string for the pattern. If omitted, defaults to searching to the end of the string. |
Pattern Offset | The offset into the pattern for which to search. Defaults to the start of the pattern. |
Pattern Length | The length from the offset in the pattern for which to search. If omitted, defaults to searching for the entire pattern from the offset until the end. |
To find the location of a substring within a string:
Use the [String->Find] tag. The following example finds the position of the word Pilot within the string OmniPilot.
[Variable: 'theString' = 'OmniPilot']
[Output: $theString->(Find: 'Pilot')]
5